package com.mavenq.fly.business.entity;

import lombok.Data;
import org.omg.CORBA.TIMEOUT;
import org.springframework.util.StopWatch;

import java.util.concurrent.TimeUnit;

@Data
public class Base {
    private Integer id;

    public static void main(String[] args) throws InterruptedException {
        StopWatch stopWatch = new StopWatch();
        stopWatch.start("1");
        TimeUnit.SECONDS.sleep(1);
        stopWatch.stop();
        stopWatch.start("2");
        TimeUnit.SECONDS.sleep(2);
        stopWatch.stop();
        System.out.println("last: "+stopWatch.getLastTaskTimeMillis());
        System.out.println("total: "+stopWatch.getTotalTimeSeconds());

    }
}
